home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 15 / BBS in a box XV-2.iso / Files II / Prog / D-G / DinkClassSharewarePackage.sit / DinkClass Shareware Package / DinkClass / DApplication.c < prev    next >
MacBinary  |  1992-12-31  |  6.6 KB  |  [TEXT/KAHL]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert Compact Compressed (Unix) (archive/compact) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, Thu Dec 31 07:36:07 1992, modified Thu Dec 31 07:36:07 1992, creator Think C, type ASCII, 6051 bytes "DApplication.c" , at 0x1823 428 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[KAHL]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0e 44 41 70 70 6c 69 | 63 61 74 69 6f 6e 2e 63 |..DAppli|cation.c|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4b 41 48 | 4c 00 00 00 00 00 00 00 |.TEXTKAH|L.......|
|00000050| 00 00 00 00 00 17 a3 00 | 00 01 ac a7 68 99 b7 a7 |........|....h...|
|00000060| 68 99 b7 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |h.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 81 2f 00 00 |........|...../..|
|00000080| 2f 2a 0d 09 46 69 6c 65 | 3a 09 09 44 41 70 70 6c |/*..File|:..DAppl|
|00000090| 69 63 61 74 69 6f 6e 2e | 63 70 0d 0d 09 43 6f 6e |ication.|cp...Con|
|000000a0| 74 61 69 6e 73 3a 09 78 | 78 78 20 70 75 74 20 63 |tains:.x|xx put c|
|000000b0| 6f 6e 74 65 6e 74 73 20 | 68 65 72 65 20 78 78 78 |ontents |here xxx|
|000000c0| 0d 0d 09 57 72 69 74 74 | 65 6e 20 62 79 3a 09 4d |...Writt|en by:.M|
|000000d0| 61 72 6b 20 47 72 6f 73 | 73 0d 0d 09 43 6f 70 79 |ark Gros|s...Copy|
|000000e0| 72 69 67 68 74 3a 09 a9 | 20 31 39 39 32 20 62 79 |right:..| 1992 by|
|000000f0| 20 41 70 70 6c 69 65 64 | 20 54 65 63 68 6e 69 63 | Applied| Technic|
|00000100| 61 6c 20 53 6f 66 74 77 | 61 72 65 2c 20 61 6c 6c |al Softw|are, all|
|00000110| 20 72 69 67 68 74 73 20 | 72 65 73 65 72 76 65 64 | rights |reserved|
|00000120| 2e 0d 0d 09 43 68 61 6e | 67 65 20 48 69 73 74 6f |....Chan|ge Histo|
|00000130| 72 79 20 28 6d 6f 73 74 | 20 72 65 63 65 6e 74 20 |ry (most| recent |
|00000140| 66 69 72 73 74 29 3a 0d | 0d 09 09 20 3c 36 3e 09 |first):.|... <6>.|
|00000150| 31 32 2f 33 31 2f 39 32 | 09 4d 54 47 09 09 6d 61 |12/31/92|.MTG..ma|
|00000160| 6b 69 6e 67 20 74 68 65 | 20 63 6f 64 65 20 63 6f |king the| code co|
|00000170| 6e 64 69 74 69 6f 6e 61 | 6c 79 20 63 6f 6d 70 69 |nditiona|ly compi|
|00000180| 6c 65 64 20 73 6f 20 20 | 20 20 20 20 20 20 20 74 |led so | t|
|00000190| 68 61 74 20 49 20 61 6d | 0d 09 09 09 09 09 09 09 |hat I am|........|
|000001a0| 09 09 61 6c 77 61 79 73 | 20 77 6f 72 6b 69 6e 67 |..always| working|
|000001b0| 20 77 69 74 68 20 61 20 | 63 75 72 72 65 6e 74 20 | with a |current |
|000001c0| 20 20 20 20 20 20 20 20 | 76 65 72 73 69 6f 6e 20 | |version |
|000001d0| 69 6e 20 65 69 74 68 65 | 72 20 74 68 69 6e 6b 20 |in eithe|r think |
|000001e0| 63 0d 09 09 09 09 09 09 | 09 09 09 6f 72 20 4d 50 |c.......|...or MP|
|000001f0| 57 20 43 2b 2b 0d 09 09 | 20 3c 35 3e 09 31 31 2f |W C++...| <5>.11/|
|00000200| 31 34 2f 39 32 09 4d 54 | 47 09 09 42 72 69 6e 67 |14/92.MT|G..Bring|
|00000210| 69 6e 67 20 74 68 65 20 | 43 2b 2b 20 76 65 72 73 |ing the |C++ vers|
|00000220| 69 6f 6e 20 75 70 20 74 | 6f 20 64 61 74 65 20 57 |ion up t|o date W|
|00000230| 52 54 20 74 68 65 20 54 | 68 69 6e 6b 43 20 76 65 |RT the T|hinkC ve|
|00000240| 72 73 69 6f 6e 2e 0d 09 | 09 20 3c 34 3e 09 20 39 |rsion...|. <4>. 9|
|00000250| 2f 32 30 2f 39 32 09 4d | 54 47 09 09 42 72 69 6e |/20/92.M|TG..Brin|
|00000260| 67 69 6e 67 20 74 68 65 | 20 43 2b 2b 76 65 72 73 |ging the| C++vers|
|00000270| 69 6f 6e 20 75 70 20 74 | 6f 20 64 61 74 65 20 77 |ion up t|o date w|
|00000280| 69 74 68 20 74 68 65 20 | 54 48 49 4e 4b 20 43 20 |ith the |THINK C |
|00000290| 56 45 52 53 49 4f 4e 0d | 09 09 20 3c 33 3e 09 20 |VERSION.|.. <3>. |
|000002a0| 20 38 2f 39 2f 39 32 09 | 4d 54 47 09 09 6d 65 72 | 8/9/92.|MTG..mer|
|000002b0| 67 69 6e 67 20 69 6e 20 | 63 68 61 6e 67 65 73 20 |ging in |changes |
|000002c0| 66 72 6f 6d 20 74 68 65 | 20 54 68 69 6e 6b 43 20 |from the| ThinkC |
|000002d0| 76 65 72 73 69 6f 6e 0d | 09 09 20 3c 32 3e 09 20 |version.|.. <2>. |
|000002e0| 20 38 2f 38 2f 39 32 09 | 4d 54 47 09 09 66 69 78 | 8/8/92.|MTG..fix|
|000002f0| 69 6e 67 20 77 61 72 6e | 69 6e 67 73 0d 0d 09 54 |ing warn|ings...T|
|00000300| 6f 20 44 6f 3a 0d 2a 2f | 0d 0d 2f 2f 20 54 68 69 |o Do:.*/|..// Thi|
|00000310| 73 20 69 73 20 74 68 65 | 20 43 6c 61 73 73 20 64 |s is the| Class d|
|00000320| 65 66 69 6e 69 74 69 6f | 6e 20 6f 66 20 74 68 65 |efinitio|n of the|
|00000330| 20 44 41 70 70 6c 69 63 | 61 74 69 6f 6e 20 63 6c | DApplic|ation cl|
|00000340| 61 73 73 0d 2f 2f 0d 0d | 23 69 6e 63 6c 75 64 65 |ass.//..|#include|
|00000350| 20 22 44 41 70 70 6c 69 | 63 61 74 69 6f 6e 2e 68 | "DAppli|cation.h|
|00000360| 22 0d 23 69 6e 63 6c 75 | 64 65 20 22 44 45 76 65 |".#inclu|de "DEve|
|00000370| 6e 74 48 61 6e 64 6c 65 | 72 2e 68 22 0d 23 69 6e |ntHandle|r.h".#in|
|00000380| 63 6c 75 64 65 20 22 44 | 44 6f 63 75 6d 65 6e 74 |clude "D|Document|
|00000390| 2e 68 22 0d 0d 0d 44 41 | 70 70 6c 69 63 61 74 69 |.h"...DA|pplicati|
|000003a0| 6f 6e 3a 3a 44 41 70 70 | 6c 69 63 61 74 69 6f 6e |on::DApp|lication|
|000003b0| 28 76 6f 69 64 29 0d 7b | 0d 09 66 49 74 65 72 61 |(void).{|..fItera|
|000003c0| 74 6f 72 20 20 3d 20 6e | 65 77 20 44 49 74 65 72 |tor = n|ew DIter|
|000003d0| 61 74 6f 72 3b 0d 0d 7d | 0d 0d 44 41 70 70 6c 69 |ator;..}|..DAppli|
|000003e0| 63 61 74 69 6f 6e 3a 3a | 7e 44 41 70 70 6c 69 63 |cation::|~DApplic|
|000003f0| 61 74 69 6f 6e 28 76 6f | 69 64 29 0d 7b 0d 09 64 |ation(vo|id).{..d|
|00000400| 65 6c 65 74 65 20 66 49 | 74 65 72 61 74 6f 72 3b |elete fI|terator;|
|00000410| 0d 7d 0d 0d 0d 0d 2f 2f | 53 65 74 20 75 70 20 74 |.}....//|Set up t|
|00000420| 68 65 20 48 61 6e 64 6c | 65 72 20 6c 69 73 74 73 |he Handl|er lists|
|00000430| 20 61 6e 64 20 73 65 74 | 20 75 70 20 74 68 65 20 | and set| up the |
|00000440| 6d 65 6d 62 65 72 73 20 | 74 6f 20 73 61 66 65 20 |members |to safe |
|00000450| 76 61 6c 75 65 73 0d 0d | 42 6f 6f 6c 65 61 6e 09 |values..|Boolean.|
|00000460| 44 41 70 70 6c 69 63 61 | 74 69 6f 6e 3a 3a 49 6e |DApplica|tion::In|
|00000470| 69 74 41 70 70 28 76 6f | 69 64 29 0d 7b 0d 09 48 |itApp(vo|id).{..H|
|00000480| 61 6e 64 6c 65 09 6d 65 | 6e 75 42 61 72 3b 0d 09 |andle.me|nuBar;..|
|00000490| 0d 09 66 45 76 65 6e 74 | 48 61 6e 64 6c 65 72 73 |..fEvent|Handlers|
|000004a0| 20 3d 20 6e 65 77 20 44 | 4c 69 73 74 3b 0d 09 66 | = new D|List;..f|
|000004b0| 44 65 61 64 48 61 6e 64 | 6c 65 72 73 20 3d 20 6e |DeadHand|lers = n|
|000004c0| 65 77 20 44 4c 69 73 74 | 3b 0d 09 66 45 76 65 6e |ew DList|;..fEven|
|000004d0| 74 48 61 6e 64 6c 65 72 | 73 2d 3e 49 6e 69 74 28 |tHandler|s->Init(|
|000004e0| 29 3b 0d 09 66 44 65 61 | 64 48 61 6e 64 6c 65 72 |);..fDea|dHandler|
|000004f0| 73 2d 3e 49 6e 69 74 28 | 29 3b 0d 09 66 53 6c 65 |s->Init(|);..fSle|
|00000500| 65 70 56 61 6c 20 3d 20 | 53 4c 45 45 50 56 41 4c |epVal = |SLEEPVAL|
|00000510| 3b 0d 09 66 44 6f 6e 65 | 20 3d 20 46 41 4c 53 45 |;..fDone| = FALSE|
|00000520| 3b 0d 0d 09 66 54 61 72 | 67 65 74 20 3d 20 74 68 |;...fTar|get = th|
|00000530| 69 73 3b 0d 09 66 43 6c | 69 70 44 61 74 61 20 3d |is;..fCl|ipData =|
|00000540| 20 4e 55 4c 4c 3b 0d 09 | 47 65 74 43 6c 69 70 46 | NULL;..|GetClipF|
|00000550| 72 6f 6d 53 79 73 74 65 | 6d 28 29 3b 0d 09 66 49 |romSyste|m();..fI|
|00000560| 6e 42 61 63 6b 67 72 6f | 75 6e 64 20 3d 20 66 61 |nBackgro|und = fa|
|00000570| 6c 73 65 3b 0d 09 66 43 | 75 72 73 6f 72 52 67 6e |lse;..fC|ursorRgn|
|00000580| 20 3d 20 4e 65 77 52 67 | 6e 28 29 3b 0d 09 0d 09 | = NewRg|n();....|
|00000590| 6d 65 6e 75 42 61 72 20 | 3d 20 47 65 74 4e 65 77 |menuBar |= GetNew|
|000005a0| 4d 42 61 72 28 72 4d 65 | 6e 75 42 61 72 49 44 29 |MBar(rMe|nuBarID)|
|000005b0| 3b 0d 09 53 65 74 4d 65 | 6e 75 42 61 72 28 6d 65 |;..SetMe|nuBar(me|
|000005c0| 6e 75 42 61 72 29 3b 0d | 09 44 69 73 70 6f 73 48 |nuBar);.|.DisposH|
|000005d0| 61 6e 64 6c 65 28 6d 65 | 6e 75 42 61 72 29 3b 0d |andle(me|nuBar);.|
|000005e0| 09 41 64 64 52 65 73 4d | 65 6e 75 28 47 65 74 4d |.AddResM|enu(GetM|
|000005f0| 48 61 6e 64 6c 65 28 72 | 41 70 70 6c 65 4d 65 6e |Handle(r|AppleMen|
|00000600| 75 29 2c 20 27 44 52 56 | 52 27 29 3b 0d 09 44 72 |u), 'DRV|R');..Dr|
|00000610| 61 77 4d 65 6e 75 42 61 | 72 28 29 3b 0d 0d 09 72 |awMenuBa|r();...r|
|00000620| 65 74 75 72 6e 20 54 52 | 55 45 3b 20 09 2f 2f 20 |eturn TR|UE; .// |
|00000630| 49 20 6b 6e 6f 77 20 74 | 68 61 74 20 69 74 20 6e |I know t|hat it n|
|00000640| 65 76 65 72 20 77 69 6c | 6c 20 72 65 74 75 72 6e |ever wil|l return|
|00000650| 20 66 61 6c 73 0d 09 09 | 09 09 09 2f 2f 20 62 75 | fals...|...// bu|
|00000660| 74 2c 20 49 20 74 68 69 | 6e 6b 20 73 75 62 63 6c |t, I thi|nk subcl|
|00000670| 61 73 73 65 73 20 6d 61 | 79 20 6e 65 65 64 20 74 |asses ma|y need t|
|00000680| 6f 20 68 61 76 65 0d 09 | 09 09 09 09 2f 2f 20 74 |o have..|....// t|
|00000690| 68 65 20 6f 70 74 69 6f | 6e 20 6f 66 20 72 65 74 |he optio|n of ret|
|000006a0| 75 72 6e 69 6e 67 20 46 | 41 4c 53 45 2e 0d 7d 2f |urning F|ALSE..}/|
|000006b0| 2f 20 65 6e 64 20 6f 66 | 20 6d 65 6d 62 65 72 20 |/ end of| member |
|000006c0| 66 75 6e 63 74 69 6f 6e | 20 49 6e 69 74 41 70 70 |function| InitApp|
|000006d0| 0d 0d 0d 2f 2f 20 41 64 | 64 20 61 6c 6c 20 74 68 |...// Ad|d all th|
|000006e0| 65 20 65 76 65 6e 74 20 | 68 61 6e 64 6c 65 72 73 |e event |handlers|
|000006f0| 20 74 6f 20 74 68 65 20 | 66 44 65 61 64 48 61 6e | to the |fDeadHan|
|00000700| 64 6c 65 72 73 20 62 79 | 20 74 65 6c 6c 69 6e 67 |dlers by| telling|
|00000710| 20 74 68 65 6d 20 61 6c | 6c 20 74 6f 20 0d 2f 2f | them al|l to .//|
|00000720| 20 6b 69 6c 6c 20 74 68 | 65 6d 20 73 65 6c 76 65 | kill th|em selve|
|00000730| 73 20 74 68 65 6e 20 46 | 6c 75 73 68 20 27 65 6d |s then F|lush 'em|
|00000740| 21 20 20 54 68 69 73 20 | 6d 65 74 68 6f 64 20 73 |! This |method s|
|00000750| 6d 6f 6b 65 64 20 6f 75 | 74 20 61 20 6c 6f 74 20 |moked ou|t a lot |
|00000760| 6f 66 20 73 69 64 65 20 | 65 66 66 65 63 74 0d 2f |of side |effect./|
|00000770| 2f 20 70 72 6f 62 6c 65 | 6d 73 20 77 69 74 68 20 |/ proble|ms with |
|00000780| 74 68 65 20 65 76 65 6e | 74 20 68 61 6e 64 6c 65 |the even|t handle|
|00000790| 72 20 6d 61 69 6e 74 65 | 6e 61 6e 63 65 20 69 6d |r mainte|nance im|
|000007a0| 70 6c 65 6d 65 6e 74 65 | 64 20 69 6e 20 44 69 6e |plemente|d in Din|
|000007b0| 6b 43 6c 61 73 73 2c 20 | 49 74 73 20 62 65 65 6e |kClass, |Its been|
|000007c0| 0d 2f 2f 20 66 69 78 65 | 64 2e 20 20 49 66 20 79 |.// fixe|d. If y|
|000007d0| 6f 75 72 20 69 6e 74 65 | 72 65 73 74 65 64 20 6c |our inte|rested l|
|000007e0| 6f 6f 6b 20 61 74 20 74 | 68 65 20 63 6f 6d 6d 65 |ook at t|he comme|
|000007f0| 6e 74 73 20 69 6e 20 74 | 68 65 20 0d 2f 2f 20 44 |nts in t|he .// D|
|00000800| 41 70 70 6c 69 63 61 74 | 69 6f 6e 3a 3a 46 6c 75 |Applicat|ion::Flu|
|00000810| 73 68 44 65 61 64 48 61 | 6e 64 6c 65 72 73 20 6d |shDeadHa|ndlers m|
|00000820| 65 74 68 6f 64 2e 0d 0d | 42 6f 6f 6c 65 61 6e 20 |ethod...|Boolean |
|00000830| 44 41 70 70 6c 69 63 61 | 74 69 6f 6e 3a 3a 43 6c |DApplica|tion::Cl|
|00000840| 65 61 6e 55 70 28 76 6f | 69 64 29 0d 7b 0d 09 44 |eanUp(vo|id).{..D|
|00000850| 45 76 65 6e 74 48 61 6e | 64 6c 65 72 20 2a 6e 65 |EventHan|dler *ne|
|00000860| 78 74 48 61 6e 64 6c 65 | 72 3b 0d 09 44 49 74 65 |xtHandle|r;..DIte|
|00000870| 72 61 74 6f 72 20 2a 69 | 74 65 72 61 74 6f 72 3b |rator *i|terator;|
|00000880| 0d 09 09 2f 2f 20 49 27 | 6d 20 75 73 69 6e 67 20 |...// I'|m using |
|00000890| 61 6e 20 61 6c 6f 63 61 | 74 65 64 20 69 74 65 72 |an aloca|ted iter|
|000008a0| 61 74 6f 72 20 69 6e 20 | 74 68 69 73 20 66 75 6e |ator in |this fun|
|000008b0| 63 74 69 6f 6e 20 62 65 | 63 61 75 73 65 20 49 54 |ction be|cause IT|
|000008c0| 0d 09 09 2f 2f 20 63 61 | 6c 6c 73 20 66 75 6e 63 |...// ca|lls func|
|000008d0| 74 69 6f 6e 73 20 77 68 | 69 63 68 20 72 65 73 75 |tions wh|ich resu|
|000008e0| 6c 74 20 69 6e 20 63 61 | 6c 6c 73 20 74 6f 20 66 |lt in ca|lls to f|
|000008f0| 75 6e 63 74 69 6f 6e 73 | 20 77 69 63 68 20 75 73 |unctions| wich us|
|00000900| 65 0d 09 09 2f 2f 20 74 | 68 65 20 44 41 70 70 6c |e...// t|he DAppl|
|00000910| 69 63 61 74 69 6f 6e 73 | 20 66 49 74 65 72 61 74 |ications| fIterat|
|00000920| 6f 72 20 28 77 68 69 63 | 68 20 6d 65 73 73 65 73 |or (whic|h messes|
|00000930| 20 75 70 20 69 74 73 20 | 75 73 65 20 69 6e 20 54 | up its |use in T|
|00000940| 48 49 53 0d 09 09 2f 2f | 20 66 75 6e 63 74 69 6f |HIS...//| functio|
|00000950| 6e 2e 29 0d 09 0d 09 69 | 74 65 72 61 74 6f 72 20 |n.)....i|terator |
|00000960| 3d 20 6e 65 77 20 44 49 | 74 65 72 61 74 6f 72 3b |= new DI|terator;|
|00000970| 0d 09 69 74 65 72 61 74 | 6f 72 2d 3e 49 6e 69 74 |..iterat|or->Init|
|00000980| 28 66 45 76 65 6e 74 48 | 61 6e 64 6c 65 72 73 29 |(fEventH|andlers)|
|00000990| 3b 0d 09 0d 09 77 68 69 | 6c 65 28 20 6e 65 78 74 |;....whi|le( next|
|000009a0| 48 61 6e 64 6c 65 72 20 | 3d 20 28 44 45 76 65 6e |Handler |= (DEven|
|000009b0| 74 48 61 6e 64 6c 65 72 | 20 2a 29 69 74 65 72 61 |tHandler| *)itera|
|000009c0| 74 6f 72 2d 3e 47 65 74 | 43 75 72 72 65 6e 74 54 |tor->Get|CurrentT|
|000009d0| 68 65 6e 49 6e 63 72 65 | 6d 65 6e 74 28 29 20 29 |henIncre|ment() )|
|000009e0| 0d 09 7b 0d 09 09 6e 65 | 78 74 48 61 6e 64 6c 65 |..{...ne|xtHandle|
|000009f0| 72 2d 3e 4b 69 6c 6c 4d | 65 4e 65 78 74 28 29 3b |r->KillM|eNext();|
|00000a00| 0d 09 7d 09 0d 0d 09 46 | 6c 75 73 68 44 65 61 64 |..}....F|lushDead|
|00000a10| 48 61 6e 64 6c 65 72 73 | 28 29 3b 0d 09 64 65 6c |Handlers|();..del|
|00000a20| 65 74 65 20 69 74 65 72 | 61 74 6f 72 3b 0d 09 09 |ete iter|ator;...|
|00000a30| 0d 09 72 65 74 75 72 6e | 20 66 44 6f 6e 65 3b 2f |..return| fDone;/|
|00000a40| 2f 20 69 66 20 75 73 65 | 72 20 63 61 6e 63 65 6c |/ if use|r cancel|
|00000a50| 65 73 20 6f 75 74 20 6f | 66 20 63 6c 6f 73 69 6e |es out o|f closin|
|00000a60| 67 20 61 20 77 69 6e 64 | 6f 77 20 74 68 65 6e 20 |g a wind|ow then |
|00000a70| 0d 09 09 09 09 2f 2f 20 | 66 44 6f 6e 65 20 69 73 |.....// |fDone is|
|00000a80| 20 72 65 73 74 20 74 6f | 20 46 41 4c 53 45 20 77 | rest to| FALSE w|
|00000a90| 69 74 68 69 6e 20 44 44 | 6f 63 75 6d 65 6e 74 3a |ithin DD|ocument:|
|00000aa0| 3a 57 69 6e 64 6f 77 43 | 6c 6f 73 65 64 2e 0d 09 |:WindowC|losed...|
|00000ab0| 09 0d 7d 2f 2f 20 65 6e | 64 20 6f 66 20 43 6c 65 |..}// en|d of Cle|
|00000ac0| 61 6e 55 70 20 6d 65 74 | 68 6f 64 2e 2e 2e 0d 0d |anUp met|hod.....|
|00000ad0| 0d 2f 2f 0d 2f 2f 20 54 | 68 65 20 66 6f 6c 6c 6f |.//.// T|he follo|
|00000ae0| 77 69 6e 67 20 73 65 63 | 74 69 6f 6e 20 6f 66 20 |wing sec|tion of |
|00000af0| 63 6f 64 65 20 69 73 20 | 74 68 65 20 64 65 66 66 |code is |the deff|
|00000b00| 69 6e 74 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 66 |intions |of the f|
|00000b10| 75 63 74 69 6f 6e 73 0d | 2f 2f 20 75 73 65 64 20 |uctions.|// used |
|00000b20| 69 6e 20 73 75 70 70 6f | 72 74 20 6f 66 20 74 68 |in suppo|rt of th|
|00000b30| 65 20 44 44 6f 63 75 6d | 65 6e 74 20 68 61 6e 64 |e DDocum|ent hand|
|00000b40| 6c 69 6e 67 20 6d 6f 64 | 6c 65 20 75 73 65 64 20 |ling mod|le used |
|00000b50| 69 6e 20 74 68 69 73 20 | 63 6c 61 73 73 20 0d 2f |in this |class ./|
|00000b60| 2f 20 6c 69 62 72 61 72 | 79 2e 20 0d 2f 2f 0d 0d |/ librar|y. .//..|
|00000b70| 44 44 6f 63 75 6d 65 6e | 74 2a 20 44 41 70 70 6c |DDocumen|t* DAppl|
|00000b80| 69 63 61 74 69 6f 6e 3a | 3a 4d 61 6b 65 44 44 6f |ication:|:MakeDDo|
|00000b90| 63 28 42 6f 6f 6c 65 61 | 6e 20 4f 70 65 6e 46 72 |c(Boolea|n OpenFr|
|00000ba0| 6f 6d 46 69 6c 65 20 29 | 0d 7b 0d 09 44 44 6f 63 |omFile )|.{..DDoc|
|00000bb0| 75 6d 65 6e 74 20 2a 4e | 65 77 3b 0d 09 0d 09 4e |ument *N|ew;....N|
|00000bc0| 65 77 20 3d 20 6e 65 77 | 28 44 44 6f 63 75 6d 65 |ew = new|(DDocume|
|00000bd0| 6e 74 29 3b 0d 09 09 09 | 2f 2f 20 69 66 20 4f 70 |nt);....|// if Op|
|00000be0| 65 6e 46 72 6f 6d 46 69 | 6c 65 20 3d 3d 20 46 41 |enFromFi|le == FA|
|00000bf0| 4c 53 45 20 74 68 65 6e | 20 69 74 20 77 69 6c 6c |LSE then| it will|
|00000c00| 20 0d 09 09 09 2f 2f 20 | 6e 6f 74 20 72 65 61 64 | ....// |not read|
|00000c10| 20 66 72 6f 6d 20 61 6e | 79 20 66 69 6c 65 0d 09 | from an|y file..|
|00000c20| 69 66 28 4e 65 77 2d 3e | 49 6e 69 74 28 4f 70 65 |if(New->|Init(Ope|
|00000c30| 6e 46 72 6f 6d 46 69 6c | 65 29 29 20 0d 09 7b 0d |nFromFil|e)) ..{.|
|00000c40| 09 09 69 66 20 28 20 66 | 54 61 72 67 65 74 20 3d |..if ( f|Target =|
|00000c50| 20 4e 65 77 2d 3e 4d 61 | 6b 65 57 69 6e 64 6f 77 | New->Ma|keWindow|
|00000c60| 28 48 61 73 43 6f 6c 6f | 72 51 44 28 29 29 20 29 |(HasColo|rQD()) )|
|00000c70| 0d 09 09 09 28 28 44 57 | 69 6e 64 6f 77 20 2a 29 |....((DW|indow *)|
|00000c80| 20 66 54 61 72 67 65 74 | 29 2d 3e 53 65 74 57 69 | fTarget|)->SetWi|
|00000c90| 6e 64 6f 77 54 69 74 6c | 65 28 29 3b 2f 2f 20 65 |ndowTitl|e();// e|
|00000ca0| 76 65 72 79 74 68 69 6e | 67 20 77 65 6e 74 20 6f |verythin|g went o|
|00000cb0| 6b 2c 20 73 6f 20 73 65 | 74 20 74 68 65 20 74 69 |k, so se|t the ti|
|00000cc0| 74 6c 65 0d 09 09 09 09 | 2f 2f 20 49 27 6d 20 68 |tle.....|// I'm h|
|00000cd0| 61 76 69 6e 67 20 74 68 | 65 20 41 70 70 20 74 65 |aving th|e App te|
|00000ce0| 6c 6c 20 0d 09 09 09 09 | 2f 2f 20 74 68 65 20 64 |ll .....|// the d|
|00000cf0| 6f 63 20 74 6f 20 6d 61 | 6b 65 20 74 68 65 20 77 |oc to ma|ke the w|
|00000d00| 69 6e 64 6f 77 20 62 65 | 63 61 75 73 65 20 49 20 |indow be|cause I |
|00000d10| 64 6f 6e 27 74 20 0d 09 | 09 09 09 2f 2f 20 6c 69 |don't ..|...// li|
|00000d20| 6b 65 20 68 61 76 65 69 | 6e 67 20 6f 6e 65 20 69 |ke havei|ng one i|
|00000d30| 6e 69 74 20 66 75 6e 63 | 74 69 6f 6e 20 64 6f 20 |nit func|tion do |
|00000d40| 74 6f 6f 20 6d 75 63 68 | 20 73 74 75 66 66 2e 20 |too much| stuff. |
|00000d50| 20 0d 09 09 09 09 2f 2f | 20 49 74 73 20 61 20 72 | .....//| Its a r|
|00000d60| 65 6c 69 61 62 69 6c 69 | 74 79 20 74 68 69 6e 67 |eliabili|ty thing|
|00000d70| 2e 20 42 54 57 20 46 41 | 4c 53 45 20 69 73 20 66 |. BTW FA|LSE is f|
|00000d80| 6f 72 20 6e 6f 20 63 6f | 6c 6f 72 51 44 0d 09 09 |or no co|lorQD...|
|00000d90| 65 6c 73 65 0d 09 09 09 | 66 54 61 72 67 65 74 20 |else....|fTarget |
|00000da0| 3d 20 4e 65 77 3b 20 2f | 2f 20 77 69 6e 64 6f 77 |= New; /|/ window|
|00000db0| 20 6e 6f 74 20 63 72 65 | 61 74 65 64 0d 09 7d 0d | not cre|ated..}.|
|00000dc0| 09 65 6c 73 65 0d 09 7b | 0d 09 09 66 54 61 72 67 |.else..{|...fTarg|
|00000dd0| 65 74 20 3d 20 74 68 69 | 73 3b 0d 09 09 53 65 6c |et = thi|s;...Sel|
|00000de0| 65 63 74 57 69 6e 64 6f | 77 28 20 46 72 6f 6e 74 |ectWindo|w( Front|
|00000df0| 57 69 6e 64 6f 77 28 29 | 29 3b 0d 09 7d 0d 09 72 |Window()|);..}..r|
|00000e00| 65 74 75 72 6e 20 4e 65 | 77 3b 0d 09 0d 7d 2f 2f |eturn Ne|w;...}//|
|00000e10| 65 6e 64 20 6d 65 6d 62 | 65 72 20 66 75 6e 63 74 |end memb|er funct|
|00000e20| 69 6f 6e 20 4d 61 6b 65 | 44 44 6f 63 0d 0d 0d 0d |ion Make|DDoc....|
|00000e30| 2f 2f 0d 2f 2f 20 44 41 | 70 70 6c 69 63 61 74 69 |//.// DA|pplicati|
|00000e40| 6f 6e 20 6f 76 65 72 69 | 64 65 73 20 6f 66 20 73 |on overi|des of s|
|00000e50| 6f 6d 65 20 6f 66 20 74 | 68 65 20 44 45 76 65 6e |ome of t|he DEven|
|00000e60| 74 48 61 6e 64 6c 65 72 | 20 73 75 62 63 6c 61 73 |tHandler| subclas|
|00000e70| 73 20 6d 65 74 68 6f 64 | 73 0d 2f 2f 0d 0d 76 6f |s method|s.//..vo|
|00000e80| 69 64 20 44 41 70 70 6c | 69 63 61 74 69 6f 6e 3a |id DAppl|ication:|
|00000e90| 3a 48 61 6e 64 6c 65 4d | 65 6e 75 43 68 6f 69 63 |:HandleM|enuChoic|
|00000ea0| 65 28 73 68 6f 72 74 20 | 6d 65 6e 75 49 44 2c 20 |e(short |menuID, |
|00000eb0| 73 68 6f 72 74 20 6d 65 | 6e 75 49 74 65 6d 29 0d |short me|nuItem).|
|00000ec0| 7b 0d 09 73 68 6f 72 74 | 09 69 74 65 6d 48 69 74 |{..short|.itemHit|
|00000ed0| 3b 0d 09 53 74 72 32 35 | 35 09 64 61 4e 61 6d 65 |;..Str25|5.daName|
|00000ee0| 3b 0d 09 73 68 6f 72 74 | 09 64 61 52 65 66 4e 75 |;..short|.daRefNu|
|00000ef0| 6d 3b 0d 0d 09 69 66 28 | 20 6d 65 6e 75 49 44 20 |m;...if(| menuID |
|00000f00| 3d 3d 20 72 41 70 70 6c | 65 4d 65 6e 75 20 29 0d |== rAppl|eMenu ).|
|00000f10| 09 7b 0d 09 09 73 77 69 | 74 63 68 20 28 6d 65 6e |.{...swi|tch (men|
|00000f20| 75 49 74 65 6d 29 0d 09 | 09 7b 0d 09 09 09 63 61 |uItem)..|.{....ca|
|00000f30| 73 65 20 69 41 62 6f 75 | 74 3a 0d 09 09 09 09 69 |se iAbou|t:.....i|
|00000f40| 74 65 6d 48 69 74 20 3d | 20 41 6c 65 72 74 28 72 |temHit =| Alert(r|
|00000f50| 41 62 6f 75 74 49 44 42 | 6f 78 2c 20 4e 55 4c 4c |AboutIDB|ox, NULL|
|00000f60| 29 3b 0d 09 09 09 09 62 | 72 65 61 6b 3b 0d 09 09 |);.....b|reak;...|
|00000f70| 09 64 65 66 61 75 6c 74 | 3a 0d 09 09 09 09 47 65 |.default|:.....Ge|
|00000f80| 74 49 74 65 6d 28 47 65 | 74 4d 48 61 6e 64 6c 65 |tItem(Ge|tMHandle|
|00000f90| 28 72 41 70 70 6c 65 4d | 65 6e 75 29 2c 20 6d 65 |(rAppleM|enu), me|
|00000fa0| 6e 75 49 74 65 6d 2c 20 | 64 61 4e 61 6d 65 29 3b |nuItem, |daName);|
|00000fb0| 0d 09 09 09 09 64 61 52 | 65 66 4e 75 6d 20 3d 20 |.....daR|efNum = |
|00000fc0| 4f 70 65 6e 44 65 73 6b | 41 63 63 28 20 64 61 4e |OpenDesk|Acc( daN|
|00000fd0| 61 6d 65 29 3b 0d 09 09 | 09 09 62 72 65 61 6b 3b |ame);...|..break;|
|00000fe0| 0d 09 09 7d 0d 09 7d 0d | 09 09 09 09 0d 09 69 66 |...}..}.|......if|
|00000ff0| 28 20 6d 65 6e 75 49 44 | 20 3d 3d 20 72 46 69 6c |( menuID| == rFil|
|00001000| 65 4d 65 6e 75 29 0d 09 | 7b 0d 09 09 73 77 69 74 |eMenu)..|{...swit|
|00001010| 63 68 20 28 6d 65 6e 75 | 49 74 65 6d 29 0d 09 09 |ch (menu|Item)...|
|00001020| 7b 0d 09 09 09 63 61 73 | 65 20 69 4e 65 77 3a 0d |{....cas|e iNew:.|
|00001030| 09 09 09 09 4d 61 6b 65 | 44 44 6f 63 28 46 41 4c |....Make|DDoc(FAL|
|00001040| 53 45 29 3b 0d 09 09 09 | 09 62 72 65 61 6b 3b 0d |SE);....|.break;.|
|00001050| 09 09 09 09 0d 09 09 09 | 63 61 73 65 20 69 4f 70 |........|case iOp|
|00001060| 65 6e 3a 0d 09 09 09 09 | 4d 61 6b 65 44 44 6f 63 |en:.....|MakeDDoc|
|00001070| 28 54 52 55 45 29 3b 0d | 09 09 09 09 62 72 65 61 |(TRUE);.|....brea|
|00001080| 6b 3b 0d 09 09 09 09 0d | 09 09 09 63 61 73 65 20 |k;......|...case |
|00001090| 69 51 75 69 74 3a 0d 09 | 09 09 09 66 44 6f 6e 65 |iQuit:..|...fDone|
|000010a0| 20 3d 20 54 52 55 45 3b | 0d 09 09 09 09 62 72 65 | = TRUE;|.....bre|
|000010b0| 61 6b 3b 0d 09 09 09 09 | 0d 09 09 09 64 65 66 61 |ak;.....|....defa|
|000010c0| 75 6c 74 3a 0d 09 09 09 | 09 62 72 65 61 6b 3b 0d |ult:....|.break;.|
|000010d0| 09 09 09 09 0d 09 09 7d | 2f 2f 20 65 6e 64 20 73 |.......}|// end s|
|000010e0| 77 69 74 63 68 20 6f 6e | 20 6d 65 6e 75 49 74 65 |witch on| menuIte|
|000010f0| 6d 0d 09 7d 2f 2f 20 65 | 6e 64 20 69 66 20 66 69 |m..}// e|nd if fi|
|00001100| 6c 65 4d 65 6e 75 0d 09 | 0d 09 69 6e 68 65 72 69 |leMenu..|..inheri|
|00001110| 74 65 64 3a 3a 48 61 6e | 64 6c 65 4d 65 6e 75 43 |ted::Han|dleMenuC|
|00001120| 68 6f 69 63 65 28 20 6d | 65 6e 75 49 44 2c 20 6d |hoice( m|enuID, m|
|00001130| 65 6e 75 49 74 65 6d 29 | 3b 0d 7d 0d 09 09 09 0d |enuItem)|;.}.....|
|00001140| 0d 76 6f 69 64 20 44 41 | 70 70 6c 69 63 61 74 69 |.void DA|pplicati|
|00001150| 6f 6e 3a 3a 53 65 74 55 | 70 4d 65 6e 75 65 73 28 |on::SetU|pMenues(|
|00001160| 76 6f 69 64 29 0d 7b 0d | 09 4d 65 6e 75 48 61 6e |void).{.|.MenuHan|
|00001170| 64 6c 65 09 6d 65 6e 75 | 3b 0d 09 0d 09 6d 65 6e |dle.menu|;....men|
|00001180| 75 20 3d 20 47 65 74 4d | 48 61 6e 64 6c 65 28 72 |u = GetM|Handle(r|
|00001190| 46 69 6c 65 4d 65 6e 75 | 29 3b 0d 0d 09 45 6e 61 |FileMenu|);...Ena|
|000011a0| 62 6c 65 4d 65 6e 75 49 | 74 65 6d 28 20 6d 65 6e |bleMenuI|tem( men|
|000011b0| 75 2c 20 69 4e 65 77 2c | 20 54 52 55 45 29 3b 0d |u, iNew,| TRUE);.|
|000011c0| 09 2f 2f 45 6e 61 62 6c | 65 4d 65 6e 75 49 74 65 |.//Enabl|eMenuIte|
|000011d0| 6d 28 20 6d 65 6e 75 2c | 20 69 4f 70 65 6e 2c 20 |m( menu,| iOpen, |
|000011e0| 54 52 55 45 29 3b 0d 09 | 45 6e 61 62 6c 65 4d 65 |TRUE);..|EnableMe|
|000011f0| 6e 75 49 74 65 6d 28 20 | 6d 65 6e 75 2c 20 69 51 |nuItem( |menu, iQ|
|00001200| 75 69 74 2c 20 54 52 55 | 45 29 3b 0d 09 0d 09 69 |uit, TRU|E);....i|
|00001210| 6e 68 65 72 69 74 65 64 | 3a 3a 53 65 74 55 70 4d |nherited|::SetUpM|
|00001220| 65 6e 75 65 73 28 20 29 | 3b 0d 09 0d 7d 0d 0d 0d |enues( )|;...}...|
|00001230| 0d 2f 2f 20 52 65 74 75 | 72 6e 20 74 68 65 20 6e |.// Retu|rn the n|
|00001240| 75 6d 62 65 72 20 6f 66 | 20 74 79 70 65 73 20 69 |umber of| types i|
|00001250| 6e 74 20 74 68 65 20 74 | 79 70 65 4c 69 73 74 20 |nt the t|ypeList |
|00001260| 61 6e 64 20 73 74 75 66 | 66 20 74 68 65 20 66 4d |and stuf|f the fM|
|00001270| 61 69 6e 46 69 6c 65 54 | 79 70 65 0d 2f 2f 20 69 |ainFileT|ype.// i|
|00001280| 6e 20 74 68 65 20 66 69 | 72 73 74 20 69 74 65 6d |n the fi|rst item|
|00001290| 2e 20 20 0d 0d 69 6e 74 | 20 44 41 70 70 6c 69 63 |. ..int| DApplic|
|000012a0| 61 74 69 6f 6e 3a 3a 47 | 65 74 46 69 6c 65 54 79 |ation::G|etFileTy|
|000012b0| 70 65 28 4f 53 54 79 70 | 65 20 2a 74 79 70 65 4c |pe(OSTyp|e *typeL|
|000012c0| 69 73 74 29 0d 7b 0d 09 | 2a 74 79 70 65 4c 69 73 |ist).{..|*typeLis|
|000012d0| 74 20 3d 20 66 4d 61 69 | 6e 46 69 6c 65 54 79 70 |t = fMai|nFileTyp|
|000012e0| 65 3b 0d 09 72 65 74 75 | 72 6e 20 31 3b 0d 7d 0d |e;..retu|rn 1;.}.|
|000012f0| 0d 0d 76 6f 69 64 20 44 | 41 70 70 6c 69 63 61 74 |..void D|Applicat|
|00001300| 69 6f 6e 3a 3a 47 69 76 | 65 43 6c 69 70 54 6f 53 |ion::Giv|eClipToS|
|00001310| 79 73 74 65 6d 28 76 6f | 69 64 29 0d 7b 0d 09 6c |ystem(vo|id).{..l|
|00001320| 6f 6e 67 09 72 65 73 75 | 6c 74 2c 20 73 69 7a 65 |ong.resu|lt, size|
|00001330| 3b 0d 09 0d 09 69 66 28 | 66 43 6c 69 70 44 61 74 |;....if(|fClipDat|
|00001340| 61 20 21 3d 20 4e 55 4c | 4c 29 0d 09 7b 0d 09 09 |a != NUL|L)..{...|
|00001350| 72 65 73 75 6c 74 20 3d | 20 5a 65 72 6f 53 63 72 |result =| ZeroScr|
|00001360| 61 70 28 29 3b 0d 09 09 | 69 66 28 72 65 73 75 6c |ap();...|if(resul|
|00001370| 74 20 21 3d 20 6e 6f 45 | 72 72 29 0d 09 09 09 72 |t != noE|rr)....r|
|00001380| 65 74 75 72 6e 3b 0d 09 | 09 0d 09 09 73 69 7a 65 |eturn;..|....size|
|00001390| 20 3d 20 47 65 74 48 61 | 6e 64 6c 65 53 69 7a 65 | = GetHa|ndleSize|
|000013a0| 28 66 43 6c 69 70 44 61 | 74 61 29 3b 0d 09 09 48 |(fClipDa|ta);...H|
|000013b0| 4c 6f 63 6b 28 66 43 6c | 69 70 44 61 74 61 29 3b |Lock(fCl|ipData);|
|000013c0| 0d 09 09 72 65 73 75 6c | 74 20 3d 20 50 75 74 53 |...resul|t = PutS|
|000013d0| 63 72 61 70 28 73 69 7a | 65 2c 20 66 43 6c 69 70 |crap(siz|e, fClip|
|000013e0| 54 79 70 65 2c 20 2a 66 | 43 6c 69 70 44 61 74 61 |Type, *f|ClipData|
|000013f0| 29 3b 0d 09 09 48 55 6e | 6c 6f 63 6b 28 66 43 6c |);...HUn|lock(fCl|
|00001400| 69 70 44 61 74 61 29 3b | 0d 09 7d 09 0d 7d 2f 2f |ipData);|..}..}//|
|00001410| 20 65 6e 64 20 6f 66 20 | 47 69 76 65 43 6c 69 70 | end of |GiveClip|
|00001420| 54 6f 53 79 73 74 65 6d | 20 6d 65 6d 62 65 72 20 |ToSystem| member |
|00001430| 66 75 63 74 69 6f 6e 0d | 0d 0d 0d 76 6f 69 64 09 |fuction.|...void.|
|00001440| 44 41 70 70 6c 69 63 61 | 74 69 6f 6e 3a 3a 47 65 |DApplica|tion::Ge|
|00001450| 74 43 6c 69 70 46 72 6f | 6d 53 79 73 74 65 6d 28 |tClipFro|mSystem(|
|00001460| 76 6f 69 64 29 0d 7b 0d | 09 6c 6f 6e 67 09 6f 66 |void).{.|.long.of|
|00001470| 66 73 65 74 2c 20 72 65 | 73 75 6c 74 3b 0d 09 48 |fset, re|sult;..H|
|00001480| 61 6e 64 6c 65 20 09 6e | 65 77 44 61 74 61 3b 0d |andle .n|ewData;.|
|00001490| 09 0d 09 6e 65 77 44 61 | 74 61 20 3d 20 4e 65 77 |...newDa|ta = New|
|000014a0| 48 61 6e 64 6c 65 28 30 | 29 3b 20 2f 2f 20 4d 61 |Handle(0|); // Ma|
|000014b0| 6b 65 20 61 6e 20 69 6e | 69 74 69 61 6c 20 7a 65 |ke an in|itial ze|
|000014c0| 72 6f 20 6c 65 61 6e 67 | 74 68 20 68 61 6e 64 6c |ro leang|th handl|
|000014d0| 65 0d 09 09 09 09 09 09 | 09 2f 2f 20 69 74 20 77 |e.......|.// it w|
|000014e0| 69 6c 6c 20 62 65 20 73 | 69 7a 65 64 20 62 79 20 |ill be s|ized by |
|000014f0| 47 65 74 53 63 72 61 70 | 20 61 73 20 6e 65 65 64 |GetScrap| as need|
|00001500| 65 64 2e 0d 0d 09 72 65 | 73 75 6c 74 20 3d 20 47 |ed....re|sult = G|
|00001510| 65 74 53 63 72 61 70 28 | 6e 65 77 44 61 74 61 2c |etScrap(|newData,|
|00001520| 20 66 43 6c 69 70 54 79 | 70 65 2c 20 26 6f 66 66 | fClipTy|pe, &off|
|00001530| 73 65 74 29 3b 0d 09 69 | 66 20 28 72 65 73 75 6c |set);..i|f (resul|
|00001540| 74 20 3e 20 30 29 0d 09 | 7b 0d 09 09 69 66 28 66 |t > 0)..|{...if(f|
|00001550| 43 6c 69 70 44 61 74 61 | 20 21 3d 20 4e 55 4c 4c |ClipData| != NULL|
|00001560| 29 0d 09 09 09 44 69 73 | 70 6f 73 48 61 6e 64 6c |)....Dis|posHandl|
|00001570| 65 28 66 43 6c 69 70 44 | 61 74 61 29 3b 0d 09 09 |e(fClipD|ata);...|
|00001580| 53 65 74 48 61 6e 64 6c | 65 53 69 7a 65 28 6e 65 |SetHandl|eSize(ne|
|00001590| 77 44 61 74 61 2c 20 72 | 65 73 75 6c 74 29 3b 0d |wData, r|esult);.|
|000015a0| 09 09 66 43 6c 69 70 44 | 61 74 61 20 3d 20 6e 65 |..fClipD|ata = ne|
|000015b0| 77 44 61 74 61 3b 0d 09 | 7d 0d 7d 2f 2f 20 65 6e |wData;..|}.}// en|
|000015c0| 64 20 6f 66 20 47 65 74 | 43 6c 69 70 46 72 6f 6d |d of Get|ClipFrom|
|000015d0| 53 79 73 74 65 6d 20 6d | 65 6d 62 65 72 20 66 75 |System m|ember fu|
|000015e0| 6e 63 74 69 6f 6e 0d 0d | 0d 48 61 6e 64 6c 65 09 |nction..|.Handle.|
|000015f0| 44 41 70 70 6c 69 63 61 | 74 69 6f 6e 3a 3a 47 65 |DApplica|tion::Ge|
|00001600| 74 43 6c 69 70 43 6f 70 | 79 46 72 6f 6d 41 70 70 |tClipCop|yFromApp|
|00001610| 28 4f 53 54 79 70 65 20 | 2a 74 79 70 65 29 0d 7b |(OSType |*type).{|
|00001620| 0d 09 48 61 6e 64 6c 65 | 20 74 65 6d 70 48 61 6e |..Handle| tempHan|
|00001630| 64 6c 65 3b 0d 09 4f 53 | 45 72 72 20 65 72 72 3b |dle;..OS|Err err;|
|00001640| 0d 09 0d 09 2a 74 79 70 | 65 20 3d 20 66 43 6c 69 |....*typ|e = fCli|
|00001650| 70 54 79 70 65 3b 09 0d | 09 74 65 6d 70 48 61 6e |pType;..|.tempHan|
|00001660| 64 6c 65 20 3d 20 66 43 | 6c 69 70 44 61 74 61 3b |dle = fC|lipData;|
|00001670| 0d 09 65 72 72 20 3d 20 | 48 61 6e 64 54 6f 48 61 |..err = |HandToHa|
|00001680| 6e 64 28 26 74 65 6d 70 | 48 61 6e 64 6c 65 29 3b |nd(&temp|Handle);|
|00001690| 0d 09 69 66 28 65 72 72 | 20 21 3d 20 6e 6f 45 72 |..if(err| != noEr|
|000016a0| 72 29 0d 09 09 45 6e 74 | 65 72 4d 42 53 74 72 28 |r)...Ent|erMBStr(|
|000016b0| 22 66 61 69 6c 65 64 20 | 6f 6e 20 74 68 65 20 48 |"failed |on the H|
|000016c0| 61 6e 64 54 6f 48 61 6e | 64 20 63 6f 70 79 22 29 |andToHan|d copy")|
|000016d0| 3b 0d 0d 09 72 65 74 75 | 72 6e 20 74 65 6d 70 48 |;...retu|rn tempH|
|000016e0| 61 6e 64 6c 65 3b 0d 7d | 0d 0d 76 6f 69 64 09 44 |andle;.}|..void.D|
|000016f0| 41 70 70 6c 69 63 61 74 | 69 6f 6e 3a 3a 47 69 76 |Applicat|ion::Giv|
|00001700| 65 44 61 74 61 54 6f 41 | 70 70 28 48 61 6e 64 6c |eDataToA|pp(Handl|
|00001710| 65 20 64 61 74 61 2c 20 | 4f 53 54 79 70 65 20 74 |e data, |OSType t|
|00001720| 79 70 65 29 0d 7b 0d 09 | 48 61 6e 64 6c 65 20 74 |ype).{..|Handle t|
|00001730| 65 6d 70 48 61 6e 64 6c | 65 3b 0d 09 4f 53 45 72 |empHandl|e;..OSEr|
|00001740| 72 20 65 72 72 3b 0d 0d | 09 66 43 6c 69 70 54 79 |r err;..|.fClipTy|
|00001750| 70 65 20 3d 20 74 79 70 | 65 3b 0d 09 69 66 20 28 |pe = typ|e;..if (|
|00001760| 66 43 6c 69 70 44 61 74 | 61 29 0d 09 7b 0d 09 09 |fClipDat|a)..{...|
|00001770| 44 69 73 70 6f 73 48 61 | 6e 64 6c 65 28 66 43 6c |DisposHa|ndle(fCl|
|00001780| 69 70 44 61 74 61 29 3b | 0d 09 7d 0d 09 74 65 6d |ipData);|..}..tem|
|00001790| 70 48 61 6e 64 6c 65 20 | 3d 20 64 61 74 61 3b 0d |pHandle |= data;.|
|000017a0| 09 65 72 72 20 3d 20 48 | 61 6e 64 54 6f 48 61 6e |.err = H|andToHan|
|000017b0| 64 28 26 74 65 6d 70 48 | 61 6e 64 6c 65 29 3b 0d |d(&tempH|andle);.|
|000017c0| 09 69 66 28 65 72 72 20 | 21 3d 20 6e 6f 45 72 72 |.if(err |!= noErr|
|000017d0| 29 0d 09 09 45 6e 74 65 | 72 4d 42 53 74 72 28 22 |)...Ente|rMBStr("|
|000017e0| 66 61 69 6c 65 64 20 6f | 6e 20 74 68 65 20 48 61 |failed o|n the Ha|
|000017f0| 6e 64 54 6f 48 61 6e 64 | 20 63 6f 70 79 22 29 3b |ndToHand| copy");|
|00001800| 0d 09 0d 09 66 43 6c 69 | 70 44 61 74 61 20 3d 20 |....fCli|pData = |
|00001810| 74 65 6d 70 48 61 6e 64 | 6c 65 3b 0d 09 0d 7d 0d |tempHand|le;...}.|
|00001820| 0d 0d 0d 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001830| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001840| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001850| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001860| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001870| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001880| 00 00 01 00 00 00 01 6e | 00 00 00 6e 00 00 00 3e |.......n|...n...>|
|00001890| 70 00 00 0b 00 00 00 00 | 00 00 00 00 00 00 00 00 |p.......|........|
|000018a0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018b0| 0e 44 41 70 70 6c 69 63 | 61 74 69 6f 6e 2e 63 44 |.DApplic|ation.cD|
|000018c0| 02 00 00 00 50 61 72 74 | 53 49 54 78 00 00 00 00 |....Part|SITx....|
|000018d0| 00 00 50 61 72 74 53 49 | 54 78 00 00 00 00 00 00 |..PartSI|Tx......|
|000018e0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000018f0| 00 00 a9 80 17 e4 00 00 | 00 00 00 00 01 ac 00 00 |........|........|
|00001900| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001910| 00 00 00 00 00 00 00 00 | 00 2c ff c5 44 54 45 64 |........|.,..DTEd|
|00001920| 69 74 57 69 6e 64 00 00 | 60 10 60 0e 60 0c 60 0a |itWind..|`.`.`.`.|
|00001930| 60 08 60 06 60 04 60 02 | 4e 71 4e ad 00 00 4e d0 |`.`.`.`.|NqN...N.|
|00001940| 00 0d 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001950| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001960| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001970| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001980| 00 00 00 48 00 0a 43 6f | 75 72 69 65 72 00 47 48 |...H..Co|urier.GH|
|00001990| 00 ec 47 64 00 ec 47 84 | 00 ec 47 c8 00 ec 47 e2 |..Gd..G.|..G...G.|
|000019a0| 00 ec 48 12 00 ec 00 06 | 00 04 00 50 00 20 03 7d |..H.....|...P. .}|
|000019b0| 04 3d 00 50 00 20 03 7d | 04 3d a6 66 a6 8d 00 00 |.=.P. .}|.=.f....|
|000019c0| 01 a3 00 00 01 ac 00 00 | 00 8a 01 00 00 00 00 1e |........|........|
|000019d0| 00 50 00 20 03 7d 04 3d | 00 50 00 20 03 7d 04 3d |.P. .}.=|.P. .}.=|
|000019e0| 00 00 00 8a 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|000019f0| 01 00 00 00 01 6e 00 00 | 00 6e 00 00 00 3e 01 1c |.....n..|.n...>..|
|00001a00| 87 f8 04 c8 00 00 00 1c | 00 3e 00 00 4d 50 53 52 |........|.>..MPSR|
|00001a10| 00 01 00 0a 03 ed ff ff | 00 00 00 00 00 00 00 00 |........|........|
|00001a20| 03 f0 ff ff 00 00 00 4c | 00 00 00 00 00 00 00 00 |.......L|........|
|00001a30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001a70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+